Sanders would ‘absolutely’ end NSA spying

 You're correct in that POTUS can dismiss a federal agency director. However, there has to be some solid evidence in order for him to do so. The fact that it has rarely happened in U.S history is testament to that fact.  
 Federal agencies are meant to exist within the realm of the executive branch but not subject to White House authority in many ways. 
 POTUS can't just "tell" them what to do. The directors of such agencies (as far as I know) are appointed by POTUS but are not under their control.
 Remember the recent net neutrality bill that resulted in cable/ISP providers being reclassified as title II utilities? Obama seemed really keen on getting that passed (as did a large part of the American public). However, the only thing he could do was to publicly endorse the bill. If he could simply "tell them what to do", there wouldn't have need been his endorsement, or the public outcry and support of the bill, or the period of deliberation the FCC council members went through to come to a decision.  He could have just commanded wheeler to pass the law.
 Federal agencies are not under the command of  POTUS, or any other government branch for that matter. They are, and have always been, designed to be independent agencies.  They act alone and unless it can be proven that they are doing something really bad (something along the lines of treason or gross incompetence), they can't be dismissed. The White House does not control Federal Agencies any further than appointments and dismissals (which are very difficult, as I've pointed out).
 As for the rest of the content of your post, I can't really comment much. Just wanted to point out that the POTUS absolutely does not control the day-day operations nor the decision-making process (aside from public endorsements) of any governmental agency. This includes the NSA. How that situation will be resolved, I have no idea. But neither Obama nor our next president will be able to just "shut them down".  If things were that easy, our government would be far more productive that what we've been seeing in recent history.
/r/technology Thread Parent Link - thehill.com