1) Allows user to set dest as merely a filename to be placed in the current directory
If self.dest is set, but lacks a directory portion, then sets self.dest to itself with the working directory ['.'+os.sep] appended to the front of it.
2) Made so only checks for / creates the output directory once.
Note:
Without the change, if the the dest was a simply specified as a filename, the calls to os.makedirs(os.path.dirname(self.dest)) failed, because os.path.dirname(self.dest) evaluated to ''
1) Allows user to set dest as merely a filename to be placed in the current directory
If self.dest is set, but lacks a directory portion, then sets self.dest to itself with the working directory ['.'+os.sep] appended to the front of it.
2) Made so only checks for / creates the output directory once.
Note: Without the change, if the the dest was a simply specified as a filename, the calls to
os.makedirs(os.path.dirname(self.dest))
failed, becauseos.path.dirname(self.dest)
evaluated to ''