Compile a directory rather than a file to give more useful error messages