Add permalink support

Adds support for the `permalink` option in the `_config.yml`. 

Documentation: http://jekyllrb.com/docs/permalinks/

Support for Directory indexes aka pretty urls was also added. The `writePages` function detects if the post url is a directory and automatically adds an index.html file.

The new code is covered by tests :)