Fix exception when tabbing out of readonly editor

Indent plugin wasn't correctly handling the case where the editor is
read only; in that case, the path sent to getContext is null (since
there's no selection) and null objects aren't so great for
dereferencing. Added a null check for path.