proper filters and tests

Adding proper filtering to s3 read and write methods, making tests pass and working to add more.