Some error handling

No longer crashes when an invalid directory is selected.