Local image / sound loading

fix two bugs when loading local image and sound files