Fix bug in getVDirMapping() and cache mapping prefix in the session.