pts-core: Check for file before attempting to filesize() it