Perform correct tab completion in non-Sage modes
Fix regular expression
Merge pull request #420 from ihanson/mode-complete

tab completion for *sage* works when the cell is in a non-sage mode