Change the way output filenames are chosen
full functional on Mac OSX and code review
Version 0.0.6