[minor] remove trailing whitespace
Ensure that target directory exists before compiling