The file_write() function now creates missing directories.

Added make_dirs() function to create missing directories.
Fixed an error in walk_sitedef() when extracting file source information
from the parse tree.