Added --post-create which allows for a script to be ran in the container (via chroot) after it is created.
Replaced mkdir and system(mkdir) with mkpath to create multilevel directories.