Bugfixing.

 * Ensure directories to be created.
 * Proper file stat for size.