Common file and directory routines.
