Added a method to detect/report the calling environment. Currently can tell the difference between command line and HTML.

Signed-off-by: digimer <digimer@alteeve.ca>