Deal with relative paths to the data dir correctly.