Fixed cross platform sed issues. Properly detect presence of realm.io dir.