resolve/normalize a filepath using the cwd as the basepath if relative