Various File API fixes. Ready for post-receives.