Avoid extra calls to mkdir -p