Fix GetNoExtPath

if Path is dir retrun it self