Use os.path instead.
Added encoding to a header.