made write permissions more flexible.
added a check for temp-write-test files group & the php engine's groups.
Merge pull request #103 from twoSeats/write-perms-groups-fix

made write permissions check more flexible.
Merge pull request #1 from Leeflets/master

update codebase