Fix to generate friendly URLs in Edit Mode

There is a known bug in EPiServer 7 where friendly URLs cannot be
generated in the new Edit mode. Resolved this by writing a new custom
method to generate friendly URL