Make path.resolve much smarter for guessing the path context for each command