Some helpers for using promises with node