Changed tests to use output dir as parameter