Some path handling fixes/cleanup.
Add Index::remove_if().