added feature to set source directory
refactored if/else construct
fixed identation
Merge pull request #1 from sciencerockstars/master

added feature to set source directory