Media scanner ignores .nomedia on external sd card
This question is a little old, but I will post my findings on it.

This seemed to be a bug in Android 4.0. There was an issue in Media Scanner that it ignored the .nomedia file in most instances. If you cleared the Media Scanner cache, it would re-index and then honor the .nomedia file. 

According to the bug report, it was fixed with this changeset.