Added path in url.

Page#dir was returning the wrong dir ('/') for pages in directories.

Also #url was returning the wrong path for pages in directories.

Actually I wrote a fix and the tests but then I saw the list of 49 (!) pending pull requests and went through the list to find if anyone else was having the same problem. Issue #506 was a similar solution to mine but a bit cleaner and decided to use MrWerewolf's soluaion but with the tests I have already written.

Some credit should be given to MrWerewolf.