Support Python 2.5

- remove ``b''`` notation and use ``encode`` method. This method generates ``str`` value in 2.5, and generates ``bytes`` value in 3.
- remove ``relpath`` method. It is not supported in 2.5.