Guard against using iOS 8 APIs in Xcode < 6
Create the screenshot directory if it doesn't already exist
Check the return value instead of simply checking the error