set directory name based on mode
Merge pull request #5 from tjmcewan/master

set directory name based on mode