Add mechanism for storing wikipage locally instead of writing to wiki
This allows e.g. local (docker) testing of page saving outputs.
The trigger for this is the LOCAL_WRITE_PATH environement variable
which is automatically set by docker.
This is taken from heritage/bf7488d882ac479aae0be66e75cceb876adc0842 (T174614)