The problem is probably down to the fact that this information is supplied by the browser and that the machine uploading it has made a decision to class this as a generic filetype. application/octet-stream really just means treat this as a generic binary formatted file.
Unfortunately, you can't always rely on $_FILES['filename']['type'] being set properly anyhow for uploaded files, since this is up to the browser to supply. Your best bet in this case would be to use a system at the server side to check the mime type - if you find one then post ot to this thread.
The most basic check you could perform though would be a simple file extension check.