Fixed #653. Support for command line requests and (lighthttpd/nginx) installation 

The index.php should attempt to "reset" the CWD so that the assumptions it makes about paths are correct. Don't assume the CWD will always be `__DIR__ . '/index.php'`.