Fixed permissions problem when taking screenshot