Fixed py-lint errors and also a merge bug with makedirs.