Improved tests for compiling the same code and resources twice
Turns out we can't do in-place updates for repositories, so we always need to use a temp directory (#389)