fix some typos when bedDir is a dir and not file