fix for debian wheezy, please pull

Assuming everything under /var/lib/lxc/ is a directory and
then accessing it as such will fail at least on Debian wheezy,
since it contains /var/lib/lxc/template.config which is a file.