Fix input/output file paths and fix tests