Allow passing in an output directory
Wire up end-to-end test