fixed flat selection so it doesn't add the extra /

Before, if you selected a flat, it would put a "/" at
the end of the path, which is unneeded