Fixed open input and output files from BINARY_DIR.