Allow passing in a custom directory.