If the 'Maze' folder does not exist you can't just create a subfolder within in. So you need to first test for 'Maze' folder and then for the 'Screenshots' folder.
main$="C:Program FilesMaze"
sub$=main$+"Screenshots"
if not path exist(main$)
make directory main$
endif
if not path exist(sub$)
make directory sub$
endif
print path exist(sub$)
wait key
Ideally though, you should not just go and create folders in program files directory as different pcs have different setups. What if program installed in different folder, etc.
Normally you would just have a screenshots folder in same folder where game EXE is.
s$="Screenshots"
if not path exist(s$)
make directory s$
endif
print path exist(s$)
wait key
Boo!