Avoid checking MIME types of pipes and devices.

This addresses issue #1564.