Fix 'up' not to consider current directory while matching

Match found against current directory would return 0 value for levels
up.