The local sharp maximal function and BMO on locally homogeneous spaces