Check if size is set

Fixes 'Undefined index: size' when size is not set (on a directory for example)
I'm not sure if this is intended behavior, but I listed all paths and ran getSize(), but gave an error on a directory. The object was returned, but not with the size..