Add owner, group and mode attributes to machine_file

This branch adds owner, group and mode attributes to machine_file.

It also includes a fix for set_attributes to call get_attributes instead of get_file_attributes.