flag -p added to a few mkdir commands to succeed even if the target dir
already exists