Access resource attributes by method instead keys.

This fixes the following error:

  Failure/Error: expect(chef_run).to create_remote_file_with_attributes('...')
  NoMethodError:
    undefined method `[]' for Chef::Resource::RemoteFile

NOTE: We have no covering spec for this since resources are faked by
hashes (which obviously respond to `[]').