CopyFile copies a file from src to dst.
It validates both paths, ensures the source exists and is readable,
creates parent directories if needed, and verifies write permissions.
WriteFile writes data to a file, creating it if necessary.
It validates the path, creates parent directories if needed,
and verifies write permissions before writing.