MAINT: dropping second import of reduce, thanks @adamrp
MAINT: better path checking, thanks @adamrp