Fix multi line archive parsing in packaging scripts

With Python 2.7 the "replace(os.linesep, '')" seems to be broken on
Windows. Replace with version that works on all platforms.

Change-Id: Iad9f7812a20c0cc1f8de4b688e4ea999373ebcb0
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>