Right... we need the .AI
If you used the 'dashed' line settings for a normal stroke, the you should just trim back the excess, but since it sounds like that is difficult, you may have some other things specified that are interfering, or concealing the real issue.
1. Ctrl+Shift+G and Ctrl+Alt+7 & 8 will ungroup, unclip, uncompound that path and may reveal other object parts.
Also, the corners you are speaking of need to be 'continuous' in order to join correctly (this is what I be the problem is.)
2. After step 1, cut both end bits 'off' with the scissors tool, so they both end at a point (or nearly.)
3. Then push A on the keyboard for the Direct Selection tool (white arrow) then drag a box around the two overlapping (but unjoined) end pts.
4. Ctrl+Shift+Alt+J will do a Join and Average, join makes the path continous, and if repeated all around a shape, will 'close' the path. Average moves the points to an average of their two positions before it joins.
If you can't see the extra bits (handles, as you say) on screen though, to perform these steps, you'll need to figure out what is hiding or modifying them, (use step 1 to get rid of most common strangenesses)
To do anything more though, we'll need to see the .ai!
Sef.
It is alright to decorate construction, but never construct decoration. - Pugin, on Arch.