Modified to output screenshots to correct output directory, whether run from Gradle or Maven