Add OpamFilename.to_attribute to easily create a file attribute