Don't try writing file until directory has been created
Don't try writing file until directory has been created

fixes #2
terraqout/jupyter-nodejs,notablemind/jupyter-nodejs,rgbkrk/jupyter-nodejs,ebu/jupyter-nodejs