small fixes: escape short names, write out tags correctly, create content dir if it doesn't exist