title: TypeError: coercing to Unicode when run thru Windows CMD
body: <p>Hello i have next error in my script when running thru CMD,  but it succesfully works in MVS debuger.</p>
  
  <pre><code>Traceback (most recent call last):
    File "D:\Work\PyLineCounter\PyLineCounter\PyLineCounter\PyLineCounter.py", line 22, in &lt;module&gt;
      file = open(file_path,'rb')
  TypeError: coercing to Unicode: need string or buffer, WindowsPath found
  </code></pre>
  
  <pre><code>#!/usr/local/bin/python
  # coding=utf-8
  
  import re
  import os
  import io
  import sys
  import codecs
  import chardet
  import time
  
  from pathlib import Path
  
  PATH = "d:/work/"
  strings_counter = 0
  
  for file_path in Path(PATH).rglob('*.h'):
  
      file = open(file_path,'rb')
      raw_data = file.read()
      file.close()
  </code></pre>