tests: Fix macOS failures in the file tests
See the commit messages for details.
Signed-off-by: Philip Withnall pwithnall@endlessos.org
Edited by Philip Withnall
See the commit messages for details.
Signed-off-by: Philip Withnall pwithnall@endlessos.org