Fix crash when invalid user folder is supplied

Instead of simply crashing, supply an error message and exit.