Implement tests to ensure open packs are never overwritten

This is not important for Linux, as you can safely replace an
open file and the SAVE_TO_MODE_CREATE/_REPLACE/_ANY options
make it so that this is only done when permitted.

However this is impossible to do on Windows due to it being
an awful operating system that makes code almost impossible to
write without race conditions and AT BEST, jumping through loads
of hoops, AT LEAST ONE OF the source or the destination must not
be open.

Therefore this has to be a requirement of the API that has leaked
into the specification due to a limitation of any possible
implementation on the windows platform.

So these tests, while an arbitrary limitation on Linux/POSIX
platforms which don't have a broken implementation of rename(),
must be conformed to by every implementation in order to avoid
suprises when porting.