clean up pep8 error and silly code redundancy

trailing whitespace was causing a check error
basename(basename()) is redundant