Fix api.File.delete to actually delete the file