Set diropt only in Bash 3.

Turns out it wasn't supported until 4.2.29, but OS X defaults to 3.2.