Copy stream handle when loading module from file

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
[test] Add test for load module from file API call

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>