fixes bug #4467

Added rescue statement which covers the case when the media has no
associated OS ids
Merge pull request #91 from StephanDollberg/4467_media_os_ids

Fixes bug #4467