Make `--out` to create parent directories

Fix #1389.

I don't sure this should be treated as a new feature.