[download] Add exception handling

This commit added exception handling and bug fixing according to
tct-download-tizen-tests.