Add Filemode to TreeEntry

This field was missing, so let's add it, and let's add the const
definitions for the modes while we're here.