Properly handle absolute paths as well as relative ones.