Cleanup virtual path normalization and type lookup

Importantly allows virtual path normalization to not follow a symlink as the
last file in the path.