Minor fixes on MediaStorage class and improved test