Check if stderr_data is a nonempty string before returning it

It may happen stderr_data is an empty string (which is not much useful) while
stdout_data may hold the actual data.
Consolidate the code for running swap* utils and pvcreate

They should behave the same way and the one used by swap* seems to be the better
one.