add Duplicate button to dashboard

finish PR #5659

also fixes some related bugs with the path/name changes.

closes #1877

ping @ellisonbg for UI review
I don't think so, there isn't even a loop in that context.  `item` should remain the same within the context of that method.  He probably had this code nested somewhere at one point and then moved it into a method.