Why is the options check needed here? What would it mean if `options.getDir() == null` but `md....indexOf('/') != -1`?