Not sure if you've done this, but wouldn't it need to be /cast [target=focustarget,harm] Elemental Mastery for that bit to work? Though I'll admit to having no idea what elemental mastery is, so it may be the whole point is to only cast it if you have a target (rather than your focus).