fix does not accept ranges and path basename is . or / bug