courseware/views.py index function position value integer 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.
this would be cleaner if you did:
`response = self.client.get(request_url)`, then tested if `response.status_code` was 404