added test to make sure that the current directory is reset after script processing