Made the script Python 3 compatible

Useful for distributions which come with a default version of Python 3, such as Arch Linux.