Identifies script base name using script.
if ext is supplied (and script() is not empty string),
the last dot (and anything that follows it) is removed if present;
ext is appended.
Usage
scriptbase(ext = NULL)
Value
character: current filename, or empty string if indeterminate