Refactor os.platform() tests

@paulmillr What do you think? Better?