http://ubuntuforums.org/showthread.php?t=439610 has some helpful suggestions on how to discover file metadata.
Still not sure what you want to accomplish here. 777 file permissions and the absence of an .htaccess file are different issues. Would expect that deploying a basic htaccess file to the skel directory would take care of this. Might be useful to have a script that checks periodically to assure one remains present at least.
As for the file ownership / permissions issue, this would appear to be a good time to re-evaluate the use of PHP is_* test functions as found on the
File System Functions page of the PHP manual.
As I recall, at one point these were pretty darn flakey in one way or another. Possibly the fact that they tend to behave strangely on WAMP servers may have negatively impacted development flow in the view of some WAMP centric PHP developers, but I seem to recall it being a bit more involved than that.
Still, time to look at it again..
David