Add tests for issues 4099 and 7110 

I'm not sure about closing #7110, but current defaults for `dir` looks sane for me.