Issue #1 - python3 and template directory path fix

-fixes for python3 support
-template directory based on file location
-change depricated has_key to 'in' statements