Fixed bug with suffix removal in basename