better path handling; don't use consts and try not to resolve symlinks