parse options before modes

This way all the directories are available when parsing modes
allow "remove", "check" and "indexremove" to be run from the index