Fix Filesystem prepend when file doesn't exist
Added test coverage for Filesystem append
Merge pull request #2524 from fturmel/patch-13

Fix for Filesystem prepend when file doesn't exist (+ tests)
Work around errors in cache stuff.
Merge branch '4.0'