Add support for stat().
Correctly layout known areas as static rather than dynamic on OS X.