test command: make workable on Ruby 2.0.0

We need to care non-standard file descriptors (not 0, 1 and 2).