tools: mkimage: Check if file is regular file