Fix script to work on Ubuntu 13.10, fixes #3