Bug fix: os.dirname changed to os.path.dirname