Fixed hr.py so it can be run from bash.