Small fixes for ruby gem. Throwing an exception on failure. Added save metadata library method and choose file/folder dialog.