Misc changes and additions to script engine

New functions:
- $Replace(text, search, replace)
- $Tokenpos(text, pattern, token)

New switch to the dlg instruction:
- dlg -r dialog object index text

Added file handling keywords to script editor highlighter.

Minor tweaks.