Existence and uniqueness for the reflection and transmission problem in stratified electromagnetic media