Fix trailing slash detection in install