Messing around with the create_dirs function which sucks now