Resurrect file permissions tests that existed for v1 PHP cartridge

The tests now includes `~/.gem`, which is created for all cartridges.
See https://bugzilla.redhat.com/show_bug.cgi?id=974632