common: create directory structure for rpmbuild

rpmbuild version 4.4.2.3 requires to create directory
structure before invoking when _topdir is defined.

Fixes: pmem/issues#3