[python] mkdir -p functionality in Python