If somebody will write HDF read/write module, than gwyddion can do the task more easilly. Just now you can load .mi with gwyddion and save into some common intermediate format, than import into some program, that can write HDF and save it.
The software gwyddsion is a free and very capable software. It can be used to read the .mi and .hdf files, but unfortunately is not able to write to this file extension (list of supported files in the link below).
Think, the best tool was mentioned already - it is Gwyddion. But taking into consideration all problems with convert file format to another I have to mention, all AFM software may write file in xyz format what is readable for all AFM's software and other spreadsheet programs such as Origin. Maybe the key is to export to format which is readable for other soft?