Added factory for Purr main class
Fixed phpdoc
Added test for factory determine working path