http://wptricks.net/how-to-detect-category-id-using-the-category-slug-in-wordpress/
Used this to get category slug from its name
$category = get_the_category();
$catname = $category[0]->cat_name;
$catslug = get_term_by(‘name’,$catname,’category’);
echo $catslug->slug;