Better error handling for requiring a directory with no main