Feat: Add a prepend_if_not_found arg to file.blockreplace

We may also want to add data to the beginning of a file instead of appending to it.

This fixes #8707
add a test for #8707
Merge branch 'issue-8707' into develop