If I invoke vim foo/bar/somefile but foo/bar don\'t already exist, Vim refuses to save.
I know I could switch to a shell or do :!mkdi
Based on the suggestions to my question, here's what I ended up with:
function WriteCreatingDirs()
execute ':silent !mkdir -p %:h'
write
endfunction
command W call WriteCreatingDirs()
This defines the :W command. Ideally, I'd like to have all of :w!, :wq, :wq!, :wall etc work the same, but I'm not sure if it's possible without basically reimplementing them all with custom functions.