Read/write of files

Added possibility test read and write of files when one actually expects content being returned. 
The way it was, one would get a resolved promise with content 'undefined'. This breaks apps which expects resolved to equal success.  

If no file is written before the read everything same behavior as earlier happens.