Fix crash when invalid user folder is supplied

Instead of simply crashing, supply an error message and exit.
Merge pull request #523 from cfailde/cmndline

Fix crash when invalid user folder is supplied