Make an attempt to find the correct selector

Ensure the selector is a proper string, and append a '.' to a selector only if that selector is missing a '.' and a '#' as its first character.