Extra error handling for direct call
Fixed direct call to work with optional.htaccess
Merge pull request #8 from keanpedersen/master

Extra error handling for direct calls