Added chmod function

Added chmod function to the file class for permission modifying.