packagedata: Add warnings if multiple recipes try to write the same package

If multiple recipes try and write the same package it resulted in a
rather confusing traceback and unintuitive error. This patch
prints a human readable error instead.

[YOCTO #3645]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
sanity.bbclass: Ensure tmpdir exists when running the check

This avoids tracebacks from bitbake if the directory doesn't already
exist.

[YOCTO #3640]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>