mockfs.storage: Fix writing in an invalid path

raise IOError when trying to write a file in a directory that does not
exist.

Signed-off-by: Jordi Carrillo <jordilin@gmail.com>