Create target directory if necessary. Fixes #261.