adding test for use of $GLOBALS
updating tests to correct return values
adding docs for GLOBALS check to readme