Python: Creating directories programmatically