add rimraf dependency and better file.delete method