examples/sd-hd.rb: Improve SD/HD detection