Prior to this change, running smartwd in a virtualenv with Python 3 gave
a syntax error due to the script treating `print` as a keyword, rather
than a function.
This change fixes the print to work as a function, and also cleans up
some of the comments and code to better comply with PEP8
With Ruby version 1.8.5, the smartwd script would abort with an error that
the shift method would take no arguments. Therefore, I have restricted the
use of the script to ruby version 1.8.7 and above.
On older versions, it will simply behave the same as \w in PS1 of bash.