annotationsDir option can't be set

Test on the type of options is wrong
Merge pull request #2992 from dugwood/patch-1

annotationsDir option can't be set