AUI-1823 Construting URI correctly with fragment.

Hey @jonmak08 

The attached is a fix for [AUI-1823](http://issues.liferay.com/browse/AUI-1823).

If the URI containing fragment (beginning with '#'), data appending after uri will be considered as fragment. So the data will not be sent to be server as it is not a part of query.

Here we want to appending data before '#', so that they can be parts of query in URI.  So I updated the _contract method.

For more details about fragment in URI, please refer to [this guide](https://tools.ietf.org/html/rfc3986).

Let me know if you have questions.

Thanks
John.