reference thimble pages as dirs instead of files

changed the API urls.py so that pages end in '/' a thimble pages can link to their edit page by linking to ./edit -- has as side effect that pages without / are rewritten automatically. Also updated the tests