Ticket/26 Fix profile rewriting

Rewriter was tricked by path helper uri based path which included
virtual directories.

Fix #26