Sublime will save to the current directory if the file path of the buffer contains a directory entry that does not exists. I have corrected the write command to create unknown directories. Otherwise, it works fine.