support trailing slash to virtual directories too
fix issue #5