evlib#evrtpath#ExtendRuntimePath(): added flags parameter. improvements.

 * made several aspects of this function configurable through the newly
    added 'flags' parameter;
 * improved handling of paths with "strange" characters;
 * improved handling of directories with trailing '/' character;
 * improved removal of runtime directories (prior to re-adding them at
    the position desired by the caller);