Minor bugfixes. Fixing possible security issue with . and .. branch names.