Fixed text & window focus handling

Text will now be properly parsed.
Launched terminal windows will now be brought to front.
Merge pull request #36 from denkuy/terminal

Fixed text & window focus handling