Fix miscellaneous bugs in fs.wrap
#470
+218
−69
Merged
fs.wrap
#470