Installing WMF Component of ImageMagick

I’m running a Debian 6.0 server on which I have successfully installed Apache, PHP, MySQL, and various PHP plugins, including ImageMagick. I am trying to use ImageMagick to convert some WMF files to a useable format. I installed the following components successfully and then rebooted the machine:

# apt-get install imagick-bin
# apt-get install php5-imagick
# apt-get install libwmf-bin

I have the following PHP code:

<?php
try{
	$filename = 'foo.wmf';
	$im = new Imagick();
	$h = fopen($filename, 'rb');
	$im->readImageFile($h);
	$im->setImageFormat('png');
	
	header("Content-Type: image/png");
	print $im->getImageBlob();
}catch(Exception $e){
	echo $e->getMessage();
}
?>

But when I run this code, I get the following message:

unable to open file `/tmp/magick-XXK6kbGr’: @ error/constitute.c/ReadImage/572

ImageMagick works when I try to convert a JPEG file, but not this WMF file.

What is going wrong?