Derivatives of (Modified) Fredholm Determinants and Stability of Standing and Traveling Waves