Supporting Urls With ~/ while redirecting.

Fix for Issue#304

<!---
@huboard:{"order":591.99609375,"custom_state":""}
-->