Added spec for utils. Fixed dirname()