Fixed a mistake with my use of sys.argv[0] (didn't wrap it in os.path.dirname)