more accurate safe_mode check - refs #2258

@karlitschek @bartv2 @Raydiation THX