Fix Windows filepath check and add App Engine compatibility

Good catch. Not sure how this ever worked on Windows :)