courseware/views.py index function unicode error correction and test

@adampalay @sarina 

https://edx-wiki.atlassian.net/browse/LMS-2488

The unicode input now correctly results in a 404 error instead of a 500 error.
I'd put a message in here so it's easier to understand what's going on - maybe "Position {} is not an integer!".format(position)