sort resource paths so they are in order for the ui