Fix for Non-default permalinks

Non-default permalinks returned 404 with these lines being commented out.
Merge pull request #30 from sscotth/master

Fix for Non-default permalinks