core: fix unsafe cast

Using a similar change to the one presented in
Ic66ba287b6048615b71cd0b2d876e7d75bcc4655, we fix findbugs warnings
regarding unsafe cast from Object to Disk in two places.

Change-Id: Idca4575500a36a329a23b09b16530053cdbbfd17
Signed-off-by: Arik Hadas <ahadas@redhat.com>