Added various file utility functions.