Iterate through NFS exported folders by length

With a synced folder configuration like so:

 synced_folder ".", "/vagrant", :nfs => true
 synced_folder "#{ENV['HOME']}/mirror", "/mirror", :nfs => true
 synced_folder ENV['HOME'], "/home/#{ENV['USER']}", :nfs => true

on OSX, vagrant writes two overlapping exports to /etc/exports which then fail the export check.

Iterating through the list of folders in order of host path length builds a correct, single exports entry.

This line reads fairly badly, maybe there's a better way of expressing the same change?