Fix Windows filepath check and add App Engine compatibility