Support sending files and empty messages

In the footsteps of mosquitto_pub. Empty messages can be used to reset
the retained message for a topic.