refactor "_sanitize" for Python < 2.7
Merge pull request #32 from patgmiller/master

refactor "_sanitize" for Python < 2.7