Bugfix: Only try to remove a dir if it is really there

2 jobs for foundation-removal
Status Job ID Name Coverage
  Build
failed #3088
autoscale-linux
linux

00:00:34

failed #3089
openswift
osx

00:00:12

 
Name Stage Failure
failed
linux Build There is an unknown failure, please try again
atpkg/atfoundation/src/filesystem/fs.swift:431:37: error: binary operator '==' cannot be applied to operands of type 'Int32' and 'Int'
if Int32(de.d_type) == DT_DIR {
~~~~~~~~~~~~~~~~ ^ ~~~~~~
atpkg/atfoundation/src/filesystem/fs.swift:431:37: note: overloads for '==' exist with these partially matching parameter lists: (Int32, Int32), (Int, Int)
if Int32(de.d_type) == DT_DIR {
^
<unknown>:0: error: build had 1 command failures

ERROR: Build failed: exit code 1
failed
osx Build There is an unknown failure, please try again
Running task atbuild.check with overlays []
**********THE ATBUILD TEST SCRIPT*************
/Users/drew/builds/837271be/0/nitrogen/Nitrogen/builds/837271be/0/AnarchyTools/atbuild
****************SELF-HOSTING TEST**************
****************PLUGIN TEST**************
Did not find key print in plugin test
/bin/sh -c "./tests/test.sh" exited with return code 256

ERROR: Build failed: exit status 1