lib:FileCache

The cacheout function will make sure that there's a filehandle open for writing
available as the pathname you give it. It automatically closes and re-opens
files if you exceed your system file descriptor maximum.