pkg/fileutils: improve tests
pkg/fileutils: improve tests

- use t.TempDir() to make sure we're testing from a clean state
- improve checks for errors to have the correct error-type where possible

Signed-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>

jimjag/docker,moby/moby,trebonian/docker,trebonian/docker,moby/moby,jimjag/docker,konstruktoid/docker-upstream,trebonian/docker,Ramzec/docker,mahak/docker,mahak/docker,konstruktoid/docker-upstream,moby/moby,Mokolea/docker,trebonian/docker,konstruktoid/docker-upstream,thaJeztah/docker,mahak/docker,Ramzec/docker,mahak/docker,thaJeztah/docker,jimjag/docker,Ramzec/docker,thaJeztah/docker,konstruktoid/docker-upstream,Mokolea/docker,Ramzec/docker,thaJeztah/docker,moby/moby,Mokolea/docker,Mokolea/docker,jimjag/docker