Fix os.path.dirname type. Thanks to @tanglingfung. closes #10