Fixed recursive directory exclude and remote os detection