Escape shell command sent to file
Check for files / dirs before trying to delete them