Use less variables for building packages
Add method isDirectory to File model