Bugfix for result returned from states.file.prepend with test option

Fix for result in ```states.file.prepend``` to return the correct result when test option is set (see issue #15397)