Normalize the input/output directory. This converts them to absolute paths and strips trailing slashes.