Mod: add support for py3k

There's some trick in adding support for py3k.
1. Many functions in the `os` module returns str in py2 but unicode in
py3. Writting a wrapper class is the easiest way I can think of.
2. Some functions only accept str in py2 and unicode in py3. Using `six`
to detect the python version seems to be the only way to solve this
problem.