Use `os.path.join` to create path for file in OS-independent way
Use `codecs` module to open files

Prevent possible unicode errors.