Warning fix for ccache-swig tests

clang deletes the output 'file' whereas gcc does not if the output
'file' is actually a directory.